cmake_minimum_required(VERSION 3.10)
project(AgentCore)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(OpenMP REQUIRED)

include_directories(include)

add_library(AgentCore SHARED 
    src/AgentCore.cpp
    src/EnhancedAgent.cpp
)

target_link_libraries(AgentCore PUBLIC OpenMP::OpenMP_CXX)

set_target_properties(AgentCore PROPERTIES
    POSITION_INDEPENDENT_CODE ON
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

if(MSVC)
    target_compile_options(AgentCore PRIVATE /O2 /fp:fast)
else()
    target_compile_options(AgentCore PRIVATE -O3 -march=native -ffast-math)
endif()